<?php
class Mageex_ExportPdf_IndexController extends Mage_Core_Controller_Front_Action
{
	public function orderAction()
	{
		
	}
    public function printAction(){
			
		$html = '<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <title>Company Name</title>
   <style type="text/css" media="screen">
      body { background-color: #00396e; margin: 0; padding: 0; }
      p a { color: #0053a0; text-decoration: underline; }
			td.webview p { color: #ffffff; }
      td.webview a { color: #ffffff; }
      table.bgTop { background-color: #ebebeb; }
      table.bg { background-color: #ffffff; }
			td.sidebar { background-color: #ffffff; }
			table.bgBottom { background-color: #ffffff; border-bottom: 10px solid #ffffff; }
			td.blank { background-color: #ffffff; }
			td.txtBottom { background-color: #0053a0; color: #ffffff; }
      table.footer { color: #ffffff; margin: 25px 0 25px 0; }
			table.footer a { color: #ffffff; }
   </style>
</head>
<body>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
      <td align="center">
         
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
               <td class="webview">
                  <p style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; text-align: center; padding: 12px 0 25px 0;">Having trouble reading this email? <a href="%%webversion%%">View it in your browser.</a></p>
               </td>
            </tr>
         </table>
         
         <table width="100%" height="126" border="0" cellspacing="0" cellpadding="0" class="bgTop" style="border-bottom: 1px solid #d1d2d4;">
            <tr>
               <td align="center">
                  <table width="100%" height="126" border="0" cellspacing="0" cellpadding="0" class="header">
                     <tr>
                        <td align="left" class="title" width="100%"><h1 style="color: #0053a0; font-family: Arial, Helvetica, sans-serif; font-size: 37px; font-weight: normal; margin: 0 0 0 15px; padding: 0px;">Your Company Name<span style="color: #5d5d5d; font-family: Arial, Helvetica, sans-serif; font-size: 27px; font-weight: normal; margin: 0 0 0 10px; padding: 0px; text-transform: uppercase;">LLC</span></h1><p style="color: #5d5d5d; font-family: Arial, Helvetica, sans-serif; font-size: 11px; margin: 0 0 0 20px;">Enter your tag line here</p></td>
                     </tr>
                  </table>         
               </td>
            </tr>
         </table>
         
         <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bg">
            <tr>
               <td width="100%" align="center" valign="top">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                     <tr>
                        <td align="left" style="border-right: 1px solid #d1d2d4; padding: 10px 20px 10px 20px;">
													<h2 style="color: #0053a0; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; margin: 0 0 5px 0; padding: 25px 0 0 0;">Heading 1</h2>
													<p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;">Replace this text with your email content and images.</p><p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;"><a href="#" title="Learn More">Learn More</a></p>                    
                          <h2 style="border-top: 1px solid #d1d2d4; color: #0053a0; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; margin: 0 0 5px 0; padding: 25px 0 0 0;">Heading 2</h2>
													<img src="testImg.jpg" alt="Insert Image Here" width="394" height="260" style="border: 1px solid #d1d2d4;" />
													<p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;">Replace this text with your email content and images.</p>                    
                          <h2 style="border-top: 1px solid #d1d2d4; color: #0053a0; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; margin: 0 0 5px 0; padding: 25px 0 0 0;">Heading 3</h2>
                          <p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;">Replace this text with your email content and images.</p>
                        </td>
                     </tr>
                  </table>
                  
               </td>
               
               <td width="100%" align="center" valign="top" style="margin: 5px 0 5px 0; padding: 10px 20px 20px 20px;">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                     <tr>
                        <td align="left">
                        	<h3 style="color: #0053a0; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: bold; margin: 0; padding: 25px 0 0 0;">About Us</h3>
                          <p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;">Enter in a brief description about your company</p>
													<h3 style="border-top: 1px solid #d1d2d4; color: #0053a0; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: bold; margin: 0; padding: 25px 0 0 0;">Our Location</h3>
                           <p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;">27298 New Street<br />Anytown, USA 55555</p>
                           <p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;"><strong>Office Hours</strong><br />8am - 7pm, M-F<br />9am - 1pm</p>
													 <p style="color: #242424; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; margin: 0 0 25px 0; padding: 0;"><strong>O:</strong> 555-555-5555<br /><strong>F:</strong> 555-555-5555</p>             
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
         
         <table width="100%" height="40" border="0" cellspacing="0" cellpadding="0" class="bgBottom">
            <tr>
							<td class="blank" width="10">&nbsp;</td>
              <td align="center" class="txtBottom" valign="middle"><p><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10px; padding: 10px 0 10px 0;">Company Name LLC. | 29798 New Street, Anytown, USA 55555 | O: 555-555-5555 F: 555-555-5555</span></p></td>
							<td class="blank" width="10">&nbsp;</td>
            </tr>
         </table>

         <table width="100%" border="0" cellspacing="0" cellpadding="0" class="footer">
         		<tr>
            	<td align="center"><p style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal;">This is email was sent to %%emailaddress%%, <a href="%%unsubscribelink%%">click here to unsubscribe</a>.</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal;">Copyright &copy; 2008 Company Name LLC. All rights reserved.</p></td>
            </tr>
         </table>
         
      </td>
   </tr>
</table>

</body>
</html>
';
		$loader = Mage::helper('exportpdf/autoloaddompdf');
		
		//$html = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'></head><body>trial</body></html>";
		$dompdf = new DOMPDF();
		$dompdf->load_html($html);
		$dompdf->set_paper('a4', 'portrait');
		$dompdf->render();
		$dompdf->stream("sample.pdf");
		exit;
	}
}